ActionController::Routing::Routes.draw do |map|
  # The priority is based upon order of creation: first created -> highest priority.
  
  # Sample of regular route:
  # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
  # Keep in mind you can assign values other than :controller and :action

  # Sample of named route:
  # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase'
  # This route can be invoked with purchase_url(:id => product.id)

  map.home '', :controller => 'home', :action => 'index'

  map.connect 'jury/:action', :controller => 'jury', :action => 'index'
 
  map.connect 'contests/:contest_name/register', :controller => 'teams', :action => 'register'
  map.connect 'contests/:contest_name/teams/:action/:id', :controller => 'teams', :action => 'index'
  map.connect 'contests/:contest_name/problems/:action/:id', :controller => 'problems', :action => 'index'
  map.connect 'contests/:contest_name/ratings/:action/:id', :controller => 'ratings', :action => 'index'
  
  map.connect 'contests/', :controller => 'contests', :action => 'index'  
  map.connect 'contests/:contest_name/:action', :controller => 'contest', :action => 'index'
  
  # Allow downloading Web Service WSDL as a file with an extension
  # instead of a file named 'wsdl'
  map.connect ':controller/service.wsdl', :action => 'wsdl'
  
  map.connect 'cont/:action/:id', :controller => 'contests'

  # Install the default route as the lowest priority.
  map.connect ':controller/:action/:id'

end
